/**
 * Copyright (c) 2014-2015, Suredy technology Co., Ltd. All rights reserved.
 * 
 * @author ZhangMaoren
 * @since 2015年4月29日
 * @version 0.1
 */
package com.suredy.resource.model;

/**
 * @author ZhangMaoren
 *
 */
public enum ResourceType {
	Menu(1), Button(2);//, OfficeFile(3), Image(4);

	private final Integer type;

	public static ResourceType parse(Integer value) {
		ResourceType ret = null;
		switch (value) {
			case 1:
				ret = Menu;
				break;
			case 2:
				ret = Button;
				break;
//			case 3:
//				ret = OfficeFile;
//				break;
//			case 4:
//				ret = Image;
//				break;
			default:
				break;
		}
		return ret;
	}
	
	public Integer getType(){
		return type;
	}

	ResourceType(Integer value) {
		this.type = value;
	}

	public String getDescription() {
		String ret = null;
		switch (this.type) {

			case 1:
				ret = "菜单节点";
				break;
			case 2:
				ret = "按钮节点";
				break;
//			case 3:
//				ret = "Office文件";
//				break;
//			case 4:
//				ret = "图片文件";
//				break;
			default:
				break;
		}
		return ret;
	}
}
